var path = require('path');
var webpack = require('webpack');

module.exports = {
    entry: {
        vendor: ['react', 'react-dom', 'react-router', 'jquery'],
    },
    output: {
        path: path.join(__dirname, 'build'),
        filename: '[name].dll.js',
        library: '[name]_library'
    },
    resolve: {
        extensions: ['', '.js', '.jsx', '.json'], // 现在你require文件的时候可以直接使用require('file')，不用使用require('file.jsx')
    },
    plugins: [
        new webpack.DllPlugin({
            context: __dirname,
            path: path.join(__dirname, 'build', '[name]-manifest.json'),
            name: '[name]_library'
        })
    ]
};